Skip to content

Conversation

kiukchung
Copy link
Contributor

Summary:
kwargs to create_scheduler() scheduler factory method can be specified via the env var TORCHX_{ARGUMENT_NAME}=arg_value.

For example: TORCHX_TIER=prod would call the factory method as create_scheduler(session_name, tier="prod").

Python's str.strip("torchx_") doesn't remove the prefix torchx_ but rather strips any characters t, o, r, c, h, x, _ from the front and back of the string.

Change to using str.removeprefix("torchx_") which does what we intended it to.

Reviewed By: ethanbwaite

Differential Revision: D79473894

…efore setting scheduler_params

Summary:
kwargs to `create_scheduler()` scheduler factory method can be specified via the env var `TORCHX_{ARGUMENT_NAME}=arg_value`. 

For example: `TORCHX_TIER=prod` would call the factory method as `create_scheduler(session_name, tier="prod")`.

Python's `str.strip("torchx_")` doesn't remove the prefix `torchx_` but rather strips any characters `t`, `o`, `r`, `c`, `h`, `x`, `_` from the front and back of the string. 

Change to using `str.removeprefix("torchx_")` which does what we intended it to.

Reviewed By: ethanbwaite

Differential Revision: D79473894
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 4, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D79473894

Copy link
Contributor

@ethanbwaite ethanbwaite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@facebook-github-bot facebook-github-bot merged commit 0255f71 into main Aug 5, 2025
24 checks passed
@facebook-github-bot facebook-github-bot deleted the export-D79473894 branch August 5, 2025 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants